<template>
  <div id="app">
    <!-- 生命周期案例 -->
    <button @click="destoryClock=!destoryClock">{{destoryClock?'销毁时钟':"加载时钟"}}</button>

    <clock v-if="destoryClock"></clock>
  </div>
</template>

<script>
import Clock from './components/Clock.vue'
export default {
  name: 'App',
  components: {
    Clock
  },
  data() {
    return {
      destoryClock: false
    }
  },
  methods: {
 
  }
}
</script>